package com.erp.order.purchasing.model;

import com.erp.hr.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.List;

/**
 * 询价单物资 实体类
 * @Author: syz
 * @blame syz
 * @CreateTime: 2021/4/6
 */
@Data
@Entity
@DynamicInsert()
@DynamicUpdate()
@EqualsAndHashCode(callSuper = true)
@Table(name="inquiry_list_material", schema="erp")
public class InquiryListMaterial extends BaseModel {

    private static final long serialVersionUID = 1L;

    /**
     * 询价单id
     */
    @Column(name = "inquiry_list_id")
    private Long inquiryListId;

    /**
     * 供应商id
     */
    @Column(name = "supplier_id")
    private Long supplierId;

    /**
     * 物料id
     */
    @Column(name = "material_id")
    private Long materialId;

    /**
     * 采购类型
     */
    @Column(name = "line_type")
    private String lineType;

    /**
     * 物料编码
     */
    @Column(name = "material_code")
    private String materialCode;

    /**
     * 物料品牌
     */
    @Column(name = "material_brand")
    private String materialBrand;

    /**
     * 物料名称
     */
    @Column(name = "material_name")
    private String materialName;

    /**
     * 物料类目
     */
    @Column(name = "material_type")
    private String materialType;

    /**
     * 物料型号
     */
    @Column(name = "material_model")
    private String materialModel;

    /**
     * 物料单位
     */
    @Column(name = "material_unit")
    private String materialUnit;

    /**
     * 采购数量
     */
    @Column(name = "material_number")
    private Integer materialNumber;

    /**
     * 单价
     */
    @Column(name = "price")
    private BigDecimal price;

    /**
     * 总价
     */
    @Column(name = "total_price")
    private BigDecimal totalPrice;

    /**
     * 报价集合
     */
    @Transient
    private List<BigDecimal> quoteList;

    /**
     * 税率集合
     */
    @Transient
    private List<String> taxRateList;

    /**
     * 申请详情id
     */
    @Transient
    private String detailId;

    /**
     * 最低报价
     */
    @Transient
    private BigDecimal min;

    /**
     * 最高报价
     */
    @Transient
    private BigDecimal max;

    /**
     * 物资附件
     */
    @Transient
    private String accessory;
    
}